package com.guigu.community.controller;

import com.guigu.community.Dto.OrderDto;
import com.guigu.community.controller.util.NumberUtils;
import com.guigu.community.pojo.OrderItems;
import com.guigu.community.pojo.Orders;
import com.guigu.community.service.CartsService;
import com.guigu.community.service.OrderItemsService;
import com.guigu.community.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/orderItems")
public class OrderItemsController {

    @Autowired
    private OrderItemsService orderItemsService;

    //根据id查询订单表
    @PostMapping("selectOrderItemsId/{oid}")
    public List<OrderItems> selectOrderItemsId(@PathVariable Integer oid){
        return orderItemsService.queryOrderItemsId(oid);
    }
}
